package projetofinal.wsdl2js.util;

import java.io.File;

public final class Util {
	
	public static boolean stringHasContent (String aString) {
		return (aString != null && aString.trim().length() > 0);
	}
	
	public static String getFullPathname (File aFile) {
		Args.checkForNull(aFile);

		return aFile.getAbsolutePath();
		
	}
	
	public static String getPathWithoutFilename (File aFile) {
		Args.checkForNull(aFile);
		
		return aFile.getAbsolutePath().substring(0, aFile.getAbsolutePath().length() - aFile.getName().length());	
	}
	
	public static String getFilename (File aFile) {
		Args.checkForNull(aFile);
		
		return aFile.getName().substring(0, aFile.getName().indexOf("."));	
	}
	
	// PRIVATE //
	
	private Util () {
		//
	}
}